﻿RequestsApp.config(function ($routeProvider) {
    //You do not need to specify controller property because you add using ng-controller directive in html.
    //If you do that then controller will run twice.
    $routeProvider
        .when('/home', {
            templateUrl: 'home.html',
        })
        .when('/edit/:id', {
            templateUrl: 'AddOrEditForm.html',
            controller: 'EditCtrl'
        })
        .when('/add', {
            templateUrl: 'AddOrEditForm.html',
            controller: 'AddCtrl'
        });
});